<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:text="${session.title}">教师积分管理</title>
    <link th:href="@{/css/login.css}" rel="stylesheet" type="text/css" media="screen,print"/>
</head>
<body>
<div class="login-box">
    <h2><p th:text="${session.title}"></p>教师积分管理</h2>
    <form id="login-form" action="/login" method="post">
        <label for="username"><span style="color: red">*</span>用户名:</label>
        <input type="text" id="username" name="username" required>
        <label for="password"><span style="color: red">*</span>密码:</label>
        <input type="password" id="password" name="password" required>
        <label><span style="color: red">*</span>角色:</label>
        <div class="role-selector">
            <label for="user-role" style="display: none"></label><select id="user-role" name="role">
                <option value="1">老师</option>
                <option value="2">科室负责人</option>
                <option value="3">管理员</option>
            </select>
        </div>
        <span th:if="${flag==-1}" style="color: red;font-size: 15px">密码错误或未创建账号</span>
        <button type="submit">登录</button>
        <a href="toCodeLogin" style="text-decoration: none; color: blue;"><button type="button">验证码登录</button></a>
        <button type="reset">重置</button>
    </form>
</div>
</body>
</html>